Note: This tutorial assumes that you have completed the previous tutorials: xbot bringup. |
Please ask about problems and questions regarding this tutorial on answers.ros.org. Don't forget to include in your question the link to this page, the versions of your OS & ROS, and also add appropriate tags. |
SLAM Map Building with xbot
Description: How to generate a map using gmapping && hectorKeywords: navigation
Tutorial Level: BEGINNER
Next Tutorial: Autonomous Navigation of a Known Map with xbot
Contents
Package Summary
this package will introduce how building a map by hector/gmapping with xbot.
- Maintainer status: developing
Page editor: Howe
- License: TODO
OverView
- Before navigation, we need make a map first, which let robot know current environment.
- Here we fuse Asus_xtion_pro depth data and rpldar distance data together to make a map. The advantage of using fusion data to build map is robot could efficiently record the outline of hanging objects and sloping things with wide angle into map.
- Then, you could fell free to chose a mapping method to made a map
Preparation
- Firstly, you should install hector OR gmapping package for sure.
Howe to install gmaping package
- 1.make sure you have not install gmapping yet:
rospack find gmapping
- 2.install gmapping package
sudo apt-get install ros-indigo-gmapping
Howe to install hector package
- 1.make sure you have not install hector yet:
rospack find hector_mapping
- 2.install hector package
sudo apt-get install ros-indigo-hector-mapping
- Then, you should make sure you have download nav_staff in your workspace
Howe to install nav_staff package
sudo apt-get install ros-indigo-xbot_nav_staff.git
or use git
git clone https://github.com/XbotGroup/xbot_nav_staff.git
How to Run
1. launch machine
roslaunch xbot_bringup xbot_rplidar_asus.launch
2.
- a.hector
roslaunch machine hector.launch
- b.gmapping
roslaunch machine gmapping.launch
3.launch rviz
roslaunch machine 3D_RVIZ.launch
4. launch keyboard control
rosrun nav_staff keyboard_control.py
Then you can control your robot mapping
What Next?
Autonomous Navigation of a Known Map with xbot or return to Xbot main page.